<%--
  Created by IntelliJ IDEA.
  User: abb
  Date: 2018-07-11
  Time: 9:24
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <link rel="stylesheet" type="text/css" href="/static/js/jquery-easyui/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="/static/js/jquery-easyui/themes/icon.css">
    <script type="text/javascript" src="/static/js/jquery-easyui/jquery.min.js"></script>
    <script type="text/javascript" src="/static/js/jquery-easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="/static/js/jquery-easyui/locale/easyui-lang-zh_CN.js"></script>
    <script>
        $(function () {
                $('#leftDatagrid').datagrid({
                    url: '/systemDictionary/list',
                    fit:true,
                    fitColumns:true,
                    border:false,
                    rownumbers:true,

                    singleSelect:true,
                    toolbar:'#leftToolBar',
                    columns: [[
                        {field: 'name', title: '代码', width: 100},
                        {field: 'sn', title: '名称', width: 100},
                        {field: 'intro', title: '价格', width: 100}
                    ]],
                    onSelect:function (index, row) {
                        console.log(index);
                        console.log(row);

                    }

                });
                $('#rightDatagrid').datagrid({
                    url: '/systemDictionaryItem/list',
                    fit:true,
                    fitColumns:true,
                    border:false,
                    rownumbers:true,

                    singleSelect:true,
                    toolbar:'#rightToolBar',
                    columns: [[
                        {field: 'name', title: '代码', width: 100},
                        {field: 'parentId', title: '名称', width: 100},
                        {field: 'intro', title: '价格', width: 100}
                    ]]
                })

            }
        )
    </script>
</head>
<body>
<div class="easyui-layout" >
<div data-options="region:'east',title:'明细'" style="width:50%;">
    <div id="leftDatagrid"></div>
</div>
<div data-options="region:'west',title:'名录',split:true" style="width:50%;">
    <div id="rightDatagrid"></div>
</div>
</div>
<div id="leftToolBar">
    <a class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true"  data-cmd="addLeft">新增</a>
    <a class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true" data-cmd="editLeft" >编辑</a>
    <a class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true" data-cmd="closeDicLeft" >撤销</a>
    <a class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" data-cmd="reloadLeft" >刷新</a>
</div>
<div id="rightToolBar">
    <a class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true"  data-cmd="addRight">新增</a>
    <a class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true" data-cmd="editRight" >编辑</a>
    <a class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true" data-cmd="closeDicRight" >撤销</a>
    <a class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" data-cmd="reloadRight" >刷新</a>
</div>


</body>
</html>
